/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.edu.utn.frsf.tpae.a2012.g03.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author fededalla
 */
@Entity
@Table(name = "mov_pag")

public class MovimientoPago implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "mov_id", nullable = false)
    private Integer movId;
    @Column(name = "mov_pag_cod", nullable = false, length = 24)
    private String movPagCod;
    @Column(name = "mov_pag_usr_cmt", nullable = false, length = 128)
    private String movPagUsrCmt;
    //@PrimaryKeyJoinColumn(name = "mov_id")
    @JoinColumn(name = "mov_id", referencedColumnName = "mov_id")
    @OneToOne(optional = false)
    private Movimiento mov;

    public MovimientoPago() {
    }

    public MovimientoPago(Integer movId) {
        this.movId = movId;
    }

    public MovimientoPago(Integer movId, String movPagCod, String movPagUsrCmt) {
        this.movId = movId;
        this.movPagCod = movPagCod;
        this.movPagUsrCmt = movPagUsrCmt;
        this.mov = new Movimiento();
    }
    
    public MovimientoPago(Integer movId, String movPagCod, String movPagUsrCmt, Movimiento mov) {
        this.movId = movId;
        this.movPagCod = movPagCod;
        this.movPagUsrCmt = movPagUsrCmt;
        this.mov = mov;
    }

    public Integer getMovId() {
        return movId;
    }

    public void setMovId(Integer movId) {
        this.movId = movId;
    }

    public String getMovPagCod() {
        return movPagCod;
    }

    public void setMovPagCod(String movPagCod) {
        this.movPagCod = movPagCod;
    }

    public String getMovPagUsrCmt() {
        return movPagUsrCmt;
    }

    public void setMovPagUsrCmt(String movPagUsrCmt) {
        this.movPagUsrCmt = movPagUsrCmt;
    }

    public Movimiento getMov() {
        return mov;
    }

    public void setMov(Movimiento mov) {
        this.mov = mov;
    }
}